import request from '@/utils/httpRequest'

// 满减列表
export function getFullReduceList(param) {
  const res =  request({
    url: `/gb-manage/fullcut/manage/list`,
    method: 'get',
    params: param || {}
  })
  return res
}
// 失效满减
export function setStatus(param) {
  const res =  request({
    url: `/gb-manage/fullcut/manage/fail/`+ param.id,
    method: 'get'
  })
  return res
}

// 创建新满减
export function createNewFullReduce(data) {
  const res =  request({
    url: `/gb-manage/fullcut/manage/create`,
    method: 'post',
    data
  })
  return res
}
// 编辑满减
export function editFullReduce(data) {
  const res =  request({
    url: `/gb-manage/fullcut/manage/edit`,
    method: 'post',
    data
  })
  return res
}

// 商品校验
export function goodsCheck(param) {
  const res =  request({
    url: `/gb-manage/fullcut/manage/check/`+ param.id,
    method: 'post',
    data: { checkList: param.checkList, goodsType: param.goodsType }
  })
  return res
}
